package com.zhaoyuxi.redpack.consumer;


import com.zhaoyuxi.redpack.service.ITbUserRedpackService;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "redpack")
public class RedPackConsumer {

    @Autowired
    private ITbUserRedpackService iTbUserRedpackService;

    @RabbitHandler
    public void message(String message){
        iTbUserRedpackService.getPackRedis2();
    }
}
